<html>
<head>
<!--
Bill Hung
2008-05-09
Apache License 2.0
-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="swfobject.js"></script>

<style>
#transcript{ float:right;width:50% }
</style>
</head>
<body>

<div id="player">Your browser cannot play this Flash Video</div>
 
<script type="text/javascript">
// this is the code for the player
var so = new SWFObject('mediaplayer.swf','playerID','480','360','8');
//var so = new SWFObject('flvplayer.swf','playerID','480','360','8');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addVariable('height','360');
so.addVariable('width','480');
so.addVariable('file','video/46min_62mb_188kbps_ar32kb.flv');
so.addVariable('streamscript','stream.php'); 
so.addVariable('enablejs','true');
so.addVariable('javascriptid','playerID');
so.addVariable('autostart','true');
so.write('player');

// this function is caught by the JavascriptView object of the player, default function
function sendEvent(typ,prm) { thisMovie('playerID').sendEvent(typ,prm); };
// This is a javascript handler for the player and is always needed, default function
function thisMovie(movieName) {
	if(navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
};

</script>




<?
//to display the links on the html page
function printSubtitleLink($minute,$second, $text)
{
  $srt_second =  $minute*60 + $second;
  echo "<li> $minute:$second <a href='javascript:sendEvent(\"scrub\",",$srt_second,")'>",$text,"</a></li>";
}
?>
<div id="content">
<p>
<a href="javascript:sendEvent('scrub',600)"> 10 min</a>
<a href="javascript:sendEvent('scrub',1200)"> 20 min</a>
<a href="javascript:sendEvent('scrub',1800)"> 30 min</a>
<a href="javascript:sendEvent('scrub',2400)"> 40 min</a>
<a href="javascript:sendEvent('playpause')"> Play/Pause</a>
<a href="javascript:sendEvent('stop')"> Stop</a>
</p>
</div>

</body>
</html>
